<!-- #include file ="DatabaseManager.inc" -->
<%
on Error resume next

rs.Open "select * from product order by ID__c", conn
json = "{totalProperty:100,root:["

do until rs.EOF
  json = json & "{"
  for each x in rs.fields
    json = json & x.name & ":'" & x.value & "',"
  next
  json = Left(json, (Len(json)-1))
  rs.MoveNext
  json = json & "},"
loop

rs.close
conn.close

json = Left(json, (Len(json)-1))
json = json + "]}"
response.write(json)

if err.number<>0 then
response.write("err=" & err)
end if
%> 
